package sut.edu.zyp.dormitory.manage.repository;

import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import sut.edu.zyp.dormitory.manage.entity.BuildingEntity;
import sut.edu.zyp.dormitory.manage.entity.DormitoryEntity;
import sut.edu.zyp.dormitory.manage.entity.RegisterEntity;
import sut.edu.zyp.dormitory.manage.entity.StudentEntity;

import java.sql.Time;
import java.sql.Date;
import java.util.List;

/**
 * 来访信息存储服务
 *
 * @author zyp
 * @version 0.0.1
 * @since 0.0.1
 */
@RepositoryRestResource(collectionResourceRel = "register", path = "register")
public interface RegisterRepository extends PagingAndSortingRepository<RegisterEntity, String> {

    /*
    按来访者姓名查询
     */
    List<RegisterEntity> findByVisitorName (String visitorName);

    /*
   按来访者日期查询
    */
    List<RegisterEntity> findByVisitDate(Date visitDate);

}
